//
//  WYHttpServer+WYHome.m
//  CirclePush
//
//  Created by admin on 2018/4/24.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "WYHttpServer+WYHome.h"

@implementation WYHttpServer (WYHome)
+(void)getRecommendMediaListWithmediaId:(NSString *)mediaId Witharea:(NSString *)area WithPageNum:(NSNumber *)pageNum WithPageSize:(NSString *)size SucessBlock:(void(^)(BOOL success,id response,NSString *errorMessage))completion
{
    
    AFHTTPSessionManager *manager=[[WYHttpServer sharedInstance] requestManager];
    NSMutableDictionary *parm=[[WYHttpServer sharedInstance] requestParameters];
    [parm setValue:mediaId forKey:@"mediaId"];
    [parm setValue:area forKey:@"area"];
    [parm setValue:pageNum forKey:@"pageNum"];
    [parm setValue:size forKey:@"pageSize"];
    
    [[WYHttpServer sharedInstance] postOperationWithManger:manager Url:kUrlRecommendMediaList WithPara:parm Success:^(BOOL success, id response, NSString *errorMsg) {
        completion(success,response,errorMsg);
    }];
}
+(void)getImageListWithtType:(NSString *)type SucessBlock:(void(^)(BOOL success,id response,NSString *errorMessage))completion
{
    AFHTTPSessionManager *manager=[[WYHttpServer sharedInstance] requestManager];
    NSMutableDictionary *parm=[[WYHttpServer sharedInstance] requestParameters];
    [parm setValue:type forKey:@"type"];
    [[WYHttpServer sharedInstance] postOperationWithManger:manager Url:kUrlGetImageList WithPara:parm Success:^(BOOL success, id response, NSString *errorMsg) {
        completion(success,response,errorMsg);
    }];
}
+(void)getHotList:(NSString *)hotType SucessBlock:(void(^)(BOOL success,id response,NSString *errorMessage))completion
{
    AFHTTPSessionManager *manager=[[WYHttpServer sharedInstance] requestManager];
    NSMutableDictionary *parm=[[WYHttpServer sharedInstance] requestParameters];
    [parm setValue:hotType forKey:@"hotType"];
    [[WYHttpServer sharedInstance] postOperationWithManger:manager Url:kUrlGetHotList WithPara:parm Success:^(BOOL success, id response, NSString *errorMsg) {
        completion(success,response,errorMsg);
    }];
    
    
    
}

@end
